package Final;

import javax.swing.*;

import java.awt.*;
import java.awt.event.*;

public class Companyframe extends JFrame {

	JLabel welcome = new JLabel("Welcome Company Frame");
	JPanel panel = new JPanel();
	JButton accept = new JButton("Accept");
	JButton cancel = new JButton("Cancel");
	

	Companyframe(){
		super("Company Frame");
		setSize(300,200);
		setLocation(500,280);
		panel.setLayout (null); 
		
		welcome.setBounds(70,50,150,60);
		accept.setBounds(50,100,80,20);
		cancel.setBounds(160,100,80,20);
		
		
		panel.add(welcome);
		panel.add(accept);
		panel.add(cancel);
		
		
		
		
		
		
		getContentPane().add(panel);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setVisible(true);
		actioncompany();

	}
	
	public void actioncompany(){
		accept.addActionListener(new ActionListener() {
	
			public void actionPerformed(ActionEvent ae) {
				
				MainWindow mainframe = new MainWindow();
				mainframe.main(null);
				dispose();

			}
		});
	}
	
	
	public static void main(String[] args) {

		Companyframe companyframe = new Companyframe();
}
}

